home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 November / SGI Freeware 1999 November - Disc 1.iso / dist / fw_expect.idb / usr / freeware / catman / u_man / cat1 / kibitz.Z / kibitz
Text File  |  1999-01-26  |  12KB  |  265 lines

  1.  
  2.  
  3.  
  4.      KKKKIIIIBBBBIIIITTTTZZZZ((((1111))))          UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11119999    OOOOccccttttoooobbbbeeeerrrr    1111999999994444))))         KKKKIIIIBBBBIIIITTTTZZZZ((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       kibitz - allow two people to interact    with one shell
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.       kkkkiiiibbbbiiiittttzzzz [ _k_i_b_i_t_z-_a_r_g_s ] _u_s_e_r [    _p_r_o_g_r_a_m    _p_r_o_g_r_a_m-_a_r_g_s...    ]
  13.       kkkkiiiibbbbiiiittttzzzz [ _k_i_b_i_t_z-_a_r_g_s ] _u_s_e_r@_h_o_s_t [ _p_r_o_g_r_a_m _p_r_o_g_r_a_m-_a_r_g_s... ]
  14.  
  15.      IIIINNNNTTTTRRRROOOODDDDUUUUCCCCTTTTIIIIOOOONNNN
  16.       kkkkiiiibbbbiiiittttzzzz allows    two (or    more) people to    interact with one
  17.       shell    (or any    arbitrary program).  Uses include:
  18.  
  19.            +o   A novice user can ask an expert user    for help.
  20.            Using kkkkiiiibbbbiiiittttzzzz, the expert can    see what the user is
  21.            doing, and offer advice or show how to do it    right.
  22.  
  23.            +o   By running kkkkiiiibbbbiiiittttzzzz and then starting a full-screen
  24.            editor, people may carry out    a conversation,
  25.            retaining the ability to scroll backwards, save the
  26.            entire conversation,    or even    edit it    while in
  27.            progress.
  28.  
  29.            +o   People can team up on games,    document editing, or
  30.            other cooperative tasks where each person has
  31.            strengths and weaknesses that complement one
  32.            another.
  33.  
  34.      UUUUSSSSAAAAGGGGEEEE
  35.       To start kkkkiiiibbbbiiiittttzzzz, user1 runs kibitz with the argument of the
  36.       user to kibitz.  For example:
  37.  
  38.            kibitz user2
  39.  
  40.       kkkkiiiibbbbiiiittttzzzz starts    a new shell (or    another    program, if given on
  41.       the command line), while prompting user2 to run kkkkiiiibbbbiiiittttzzzz.  If
  42.       user2    runs kkkkiiiibbbbiiiittttzzzz as directed, the keystrokes    of both    users
  43.       become the input of the shell.  Similarly, both users
  44.       receive the output from the shell.
  45.  
  46.       To terminate kkkkiiiibbbbiiiittttzzzz it suffices to terminate the shell
  47.       itself.  For example,    if either user types ^D    (and the shell
  48.       accepts this to be EOF), the shell terminates    followed by
  49.       kkkkiiiibbbbiiiittttzzzz.
  50.  
  51.       Normally, all    characters are passed uninterpreted.  However,
  52.       if the escape    character (described when kkkkiiiibbbbiiiittttzzzz starts) is
  53.       issued, the user may talk directly to    the kkkkiiiibbbbiiiittttzzzz
  54.       interpreter.    Any EEEExxxxppppeeeecccctttt(1) or TTTTccccllll(3)    commands may be    given.
  55.       Also,    job control may    be used    while in the interpreter, to,
  56.       for example, suspend or restart kkkkiiiibbbbiiiittttzzzz.
  57.  
  58.       Various processes can    provide    various    effects.  For example,
  59.       you can emulate a two-way write(1) session with the command:
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 12/23/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      KKKKIIIIBBBBIIIITTTTZZZZ((((1111))))          UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11119999    OOOOccccttttoooobbbbeeeerrrr    1111999999994444))))         KKKKIIIIBBBBIIIITTTTZZZZ((((1111))))
  71.  
  72.  
  73.  
  74.            kibitz user2 sleep 1000000
  75.  
  76.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  77.       kkkkiiiibbbbiiiittttzzzz takes arguments, these    should also be separated by
  78.       whitespace.
  79.  
  80.       The ----nnnnoooopppprrrroooocccc flag runs    kkkkiiiibbbbiiiittttzzzz with no process underneath.
  81.       Characters are passed    to the other kkkkiiiibbbbiiiittttzzzz.  This is
  82.       particularly useful for connecting multiple interactive
  83.       processes together.  In this mode, characters    are not    echoed
  84.       back to the typist.
  85.  
  86.       ----nnnnooooeeeessssccccaaaappppeeee disables the escape    character.
  87.  
  88.       ----eeeessssccccaaaappppeeee _c_h_a_r sets the    escape character.  The default escape
  89.       character is ^].
  90.  
  91.       ----ssssiiiilllleeeennnntttt turns    off informational messages describing what
  92.       kibitz is doing to initiate a    connection.
  93.  
  94.       ----ttttttttyyyy _t_t_y_n_a_m_e defines the tty to which    the invitation should
  95.       be sent.
  96.  
  97.       If you start kkkkiiiibbbbiiiittttzzzz to user2 on a remote computer, kkkkiiiibbbbiiiittttzzzz
  98.       performs a rrrrllllooooggggiiiinnnn to the remote computer with    your current
  99.       username. The    flag ----pppprrrrooooxxxxyyyy _u_s_e_r_n_a_m_e causes rrrrllllooooggggiiiinnnn to use
  100.       _u_s_e_r_n_a_m_e for the remote login    (e.g. if your account on the
  101.       remote computer has a    different username). If    the ----pppprrrrooooxxxxyyyy
  102.       flag is not given, kkkkiiiibbbbiiiittttzzzz tries to determine your current
  103.       username by (in that order) inspecting the environment
  104.       variables USER and LOGNAME, then by using the    commands
  105.       wwwwhhhhooooaaaammmmiiii and llllooooggggnnnnaaaammmmeeee.
  106.  
  107.       The arguments    ----nnnnooooeeeessssccccaaaappppeeee and ----eeeessssccccaaaappppeeee can also be given    by
  108.       user2    when prompted to run kkkkiiiibbbbiiiittttzzzz.
  109.  
  110.  
  111.      MMMMOOOORRRREEEE TTTTHHHHAAAANNNN TTTTWWWWOOOO UUUUSSSSEEEERRRRSSSS
  112.       The current implementation of    kibitz explicitly understands
  113.       only two users, however, it is nonetheless possible to have
  114.       a three (or more) -way kibitz, by kibitzing another kkkkiiiibbbbiiiittttzzzz.
  115.       For example, the following command runs kkkkiiiibbbbiiiittttzzzz with the
  116.       current user,    user2, and user3:
  117.  
  118.            % kibitz    user2 kibitz user3
  119.  
  120.       Additional users may be added    by simply appending more
  121.       "kibitz user"    commands.
  122.  
  123.       The xxxxkkkkiiiibbbbiiiittttzzzz script is    similar    to kkkkiiiibbbbiiiittttzzzz but supports the
  124.       ability to add additional users (and drop them) dynamically.
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 12/23/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      KKKKIIIIBBBBIIIITTTTZZZZ((((1111))))          UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11119999    OOOOccccttttoooobbbbeeeerrrr    1111999999994444))))         KKKKIIIIBBBBIIIITTTTZZZZ((((1111))))
  137.  
  138.  
  139.  
  140.      CCCCAAAAVVVVEEEEAAAATTTTSSSS
  141.       kkkkiiiibbbbiiiittttzzzz assumes the 2nd user has the same terminal type and
  142.       size as the 1st user.     If this assumption is incorrect,
  143.       graphical programs may display oddly.
  144.  
  145.       kkkkiiiibbbbiiiittttzzzz handles character graphics, but cannot    handle
  146.       bitmapped graphics.  Thus,
  147.  
  148.            % xterm -e kibitz    will work
  149.            % kibitz    xterm        will not work
  150.  
  151.       However, you can get the effect of the latter    command    by
  152.       using    xxxxkkkkiiiibbbbiiiittttzzzz    (see SEE ALSO below).  kkkkiiiibbbbiiiittttzzzz uses the same
  153.       permissions as used by rlogin, rsh, etc.  Thus, you can only
  154.       kkkkiiiibbbbiiiittttzzzz to users at hosts for which you can rlogin.
  155.       Similarly, kkkkiiiibbbbiiiittttzzzz will prompt    for a password on the remote
  156.       host if rlogin would.
  157.  
  158.       If you kkkkiiiibbbbiiiittttzzzz    to users at remote hosts, kkkkiiiibbbbiiiittttzzzz needs to
  159.       distinguish your prompt from other things that may precede
  160.       it during login.  (Ideally, the end of it is preferred but
  161.       any part should suffice.)  If    you have an unusual prompt,
  162.       set the environment variable EXPECT_PROMPT to    an egrep(1)-
  163.       style    regular    expression.  Brackets should be    preceded with
  164.       one backslash    in ranges, and three backslashes for literal
  165.       brackets.  The default prompt    r.e. is    "($|%|#) ".
  166.  
  167.       kkkkiiiibbbbiiiittttzzzz requires the kkkkiiiibbbbiiiittttzzzz program on    both hosts.  kkkkiiiibbbbiiiittttzzzz
  168.       requires eeeexxxxppppeeeecccctttt(1).
  169.  
  170.       By comparison, the xxxxkkkkiiiibbbbiiiittttzzzz script uses the X authorization
  171.       mechanism for    inter-host communication so it does not    need
  172.       to login, recognize your prompt, or require kibitz on    the
  173.       remote host.    It does    however    need permission    to access the
  174.       other    X servers.
  175.  
  176.      BBBBUUUUGGGGSSSS
  177.       An early version of Sun's tmpfs had a    bug in it that causes
  178.       kkkkiiiibbbbiiiittttzzzz to blow up.  If kkkkiiiibbbbiiiittttzzzz    reports    "error flushing    ...:
  179.       Is a directory" ask Sun for patch #100174.
  180.  
  181.       If your Expect is not    compiled with multiple-process support
  182.       (i.e., you do    not have a working select or poll), you    will
  183.       not be able to run kibitz.
  184.  
  185.      EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  186.       The environment variable SHELL is used to determine the
  187.       shell    to start, if no    other program is given on the command
  188.       line.
  189.  
  190.       If the environment variable EXPECT_PROMPT exists, it is
  191.       taken    as a regular expression    which matches the end of your
  192.  
  193.  
  194.  
  195.      Page 3                        (printed 12/23/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      KKKKIIIIBBBBIIIITTTTZZZZ((((1111))))          UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((11119999    OOOOccccttttoooobbbbeeeerrrr    1111999999994444))))         KKKKIIIIBBBBIIIITTTTZZZZ((((1111))))
  203.  
  204.  
  205.  
  206.       login    prompt (but does not otherwise occur while logging
  207.       in). See also    CAVEATS    above.
  208.  
  209.       If the environment variables USER or LOGNAME are defined,
  210.       they are used    to determine the current user name for a
  211.       kkkkiiiibbbbiiiittttzzzz to a remote computer. See description of the ----pppprrrrooooxxxxyyyy
  212.       option in ARGUMENTS above.
  213.  
  214.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  215.       TTTTccccllll(3), lllliiiibbbbeeeexxxxppppeeeecccctttt(3),    xxxxkkkkiiiibbbbiiiittttzzzz(1)
  216.       "_E_x_p_l_o_r_i_n_g _E_x_p_e_c_t: _A _T_c_l-_B_a_s_e_d _T_o_o_l_k_i_t _f_o_r _A_u_t_o_m_a_t_i_n_g
  217.       _I_n_t_e_r_a_c_t_i_v_e _P_r_o_g_r_a_m_s"    by Don Libes, O'Reilly and Associates,
  218.       January 1995.
  219.       "_K_i_b_i_t_z - _C_o_n_n_e_c_t_i_n_g _M_u_l_t_i_p_l_e    _I_n_t_e_r_a_c_t_i_v_e _P_r_o_g_r_a_m_s
  220.       _T_o_g_e_t_h_e_r", by    Don Libes, Software - Practice & Experience,
  221.       John Wiley & Sons, West Sussex, England, Vol.    23, No.    5,
  222.       May, 1993.
  223.  
  224.      AAAAUUUUTTTTHHHHOOOORRRR
  225.       Don Libes, National Institute    of Standards and Technology
  226.  
  227.       kkkkiiiibbbbiiiittttzzzz is in the public domain.  NIST    and I would appreciate
  228.       credit if this program or parts of it    are used.
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                        (printed 12/23/98)
  262.  
  263.  
  264.  
  265.